#define _CRT_SECURE_NO_WARNINGS 1
#include"unordered_Set.hpp"
#include"unordered_Map.hpp"

class Date
{
	friend struct HashFunc;
public:
	Date(int year, int month, int day)
		:_year(year)
		,_month(month)
		,_day(day)
	{ }

	bool operator==(const Date& d) const
	{
		return _year == d._year
			&& _month == d._month
			&& _day == d._day;
	}

private:
	int _year;
	int _month;
	int _day;
};

struct HashFunc
{
	size_t operator()(const Date& date)
	{
		size_t num = 0;
		num += date._year;
		num *= 131;
		num += date._month;
		num *= 131;
		num += date._day;
		num *= 131;

		return num;
	}
};

void test_Date()
{
	xhy::unordered_set<Date, HashFunc> set;
	set.insert({ 2025, 9, 14 });
	set.insert({ 2025, 8, 2 });
	set.insert({ 2023, 2, 1 });
}

int main()
{
	/*xhy::test_uset();
	xhy::test_umap();*/
	test_Date();

	return 0;
}
